<?php

namespace Sharks\Core\LifeCycle;

use Sharks\Core\AppContext;

class RouteParamResolver extends ActionParamResolver {

	public function resolve($name, $type) {
		$app = AppContext::instance();
		$routeResult = $app->request()->route;
		$parameters = $routeResult->parameters;
		if (isset($parameters[$name])) {
			return $parameters[$name];
		}
		return null;
	}
}